package com.jy.api.vo.admin;

import com.jy.api.domain.OrderSource;
import com.jy.api.domain.OrderStatus;
import com.jy.api.domain.OrderType;
import com.jy.api.domain.PaymentChannel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by lihu on 2017/12/12.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdminOrderVo {

    private int totalPages;

    private long totalElements;

    private List<Map<String, Object>> orders = new ArrayList<>();

    public AdminOrderVo(int totalPages, long totalElements) {
        this.totalPages = totalPages;
        this.totalElements = totalElements;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Order {
        private String id;

        private double total = 0;

        private int count = 0;

        private double discount = 0;

        private double amount = 0;

        private Date paymentTime;

        private String code;

        private OrderStatus status;

        private OrderSource source;

        private OrderType type;

        private PaymentChannel channel;

    }


}
